import sys
import os
import unittest


#useless for now, just testing later

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from src.interfaces.welcome import WelcomeInterface
from src.interfaces.game import GameInterface
from src.interfaces.description import DescriptionInterface
from src.interfaces.end import EndInterface

class TestGameInterfaces(unittest.TestCase):

    def test_welcome_interface(self):
        welcome = WelcomeInterface()
        self.assertIsNotNone(welcome)
        self.assertTrue(hasattr(welcome, 'display'))
        self.assertTrue(hasattr(welcome, 'get_user_input'))

    def test_game_interface(self):
        game = GameInterface()
        self.assertIsNotNone(game)
        self.assertTrue(hasattr(game, 'start_game'))
        self.assertTrue(hasattr(game, 'render_snake'))
        self.assertTrue(hasattr(game, 'handle_controls'))

    def test_description_interface(self):
        description = DescriptionInterface()
        self.assertIsNotNone(description)
        self.assertTrue(hasattr(description, 'display_description'))

    def test_end_interface(self):
        end = EndInterface()
        self.assertIsNotNone(end)
        self.assertTrue(hasattr(end, 'display_end_screen'))
        self.assertTrue(hasattr(end, 'restart_game'))

if __name__ == '__main__':
    unittest.main()